#include <iostream>

using namespace std;

int matmax(int a[4][3],int b[2]);

int main ( )
{

    int a[4][3],s,j,i,b[2];
        cout<<"enter the element of matric;"<<endl;
    for (i=0;i<4;i++)
        for(j=0;j<3;j++)
            cin>>a[i][j];

    s=matmax(a,b);

    cout<<s<<endl;

    cin>>i;
    return 0;

}

int matmax(int a[4][3],int b[2])
{
    int s=0,i,j;
    
    for(i=0;i<4;i++)
        for(j=0;j<3;j++)
        {
            if(s<a[i][j])
            {
                s=a[i][j];
                b[0]=i;
                b[1]=j;
            }
        }
            return s;
}